package com.multitrack.map.datatype;

import android.graphics.drawable.Drawable;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

public class SingleMarker extends ItemizedOverlay<OverlayItem> {

	private OverlayItem item;

	public SingleMarker(Drawable defaultMarker) {
		super(defaultMarker);
		populate();
	}

	public SingleMarker(Drawable defaultMarker, OverlayItem item) {
		super(defaultMarker);
		this.item = item;
		populate();
	}

	public SingleMarker(Drawable defaultMarker, GeoPoint markerLoc) {
		super(defaultMarker);
		item = new OverlayItem(markerLoc, null, null);
		populate();
	}

	public void setItem(OverlayItem item) {
		this.item = item;
	}

	@Override
	protected OverlayItem createItem(int i) {
		return item;
	}

	@Override
	public int size() {
		return 1;
	}
}
